<template>
    <div>
        我是app
    </div>
    <Suspense>
        <template v-slot:default>
            <Demo />
        </template>
        <!-- v-slot简写形式 #soltName -->
        <template #fallback>
            <h1>加载中...</h1>
        </template>
    </Suspense>
</template>

<script>
import { defineAsyncComponent } from "vue";
// import Demo from "./components/Demo.vue";
const Demo = defineAsyncComponent(() => import("./components/Demo.vue"));
export default {
    name: "App",
    components: {
        Demo,
    },
    setup() {

    },
};
</script>

<style>
#app {
    font-family: Avenir, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-align: center;
    color: #2c3e50;
    margin-top: 60px;
}
</style>
